import os
from datetime import datetime

def root_path():
    """
    获取项目根目录
    """
    root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)).replace("\\","/"))
    return root_path

def get_excel_file():
    """
    获取excel文件路径
    :return:
    """
    return root_path()+"/data/宣威接口自动化测试用例.xlsx"

def get_report_path():
    """
    获取JSON格式的测试结果存放路径
    """
    return root_path()+"/report/html_report/widgets/summary.json"

def get_env_path():
    """
    获取环境配置文件路径
    """
    return root_path()+"/config/environment.ini"

def get_msg_path():
    """
    获取消息通知配置文件路径
    """
    return root_path()+"/config/message.ini"

def get_slow_api_path():
    """
    慢接口存放路径
    """
    name = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    return root_path()+f"/slow_api/{name}_api_request_slow.csv"

def get_mock_data_path():
    """
    mock服务的数据文件存储路径
    """
    return root_path()+"/mock_server/mock_data.json"


if __name__ == '__main__':
    print(get_mock_data_path())